// ==================================================================================
// Shared Genomics Project MPI Codebase
// Version 1.0 30/04/2010
//
// (c) 2010 University of Manchester all rights reserved
//
// This file is distributed under the GNU General Public License, Version 2.  
// Please see the file COPYING.txt for more details
// ==================================================================================

#ifndef _RANDOM_SLEEP_H_
#define _RANDOM_SLEEP_H_

#ifdef __cplusplus
extern "C" {
#endif

/*!
\file
\ingroup	gio
\brief		Random Sleep
\details	
	This is an attempt to randomise the termination of processing
	MPI applications so that the NIBHI file server does not 
	get >100 cores all trying to write data to disk at the same time.
*/
/*!
\brief Pauses a program for a couple of milleseconds.
\param [in] min_milleseconds Minimum sleep time
\param [in] max_milleseconds Maximum sleep time
*/
void random_sleep(int min_milleseconds, int max_milleseconds);

#ifdef __cplusplus
}
#endif

#endif // _RANDOM_SLEEP_H_
